<template>
<div class="container">
  <superlotto v-if="pageType === 'super-lotto'"></superlotto>
  <unionLotto v-if="pageType === 'union-lotto'"></unionLotto>
  <pai-three v-if="pageType === 'pai-three'" :type="type"></pai-three>
  <pai-five v-if="pageType === 'pai-five'"></pai-five>
  </div>
</template>




<script>
import superlotto from "../../components/lotteries/superlotto";
import unionLotto from "../../components/lotteries/unionLotto";
import paiThree from "../../components/lotteries/paiThree";
import paiFive from "../../components/lotteries/paiFive";

const storage = weex.requireModule("storage");
const modal = weex.requireModule("modal");
import { serialize, getBaseUrl, jsonAnalysis }  from "@/utils/index.js"

export default {
	components: {
		superlotto,
		unionLotto,
		paiThree,
		paiFive
	},

	data() {
		return {
		pageType: "",
		type:''
		};
	},
	created() {},
	methods: {
		getUrlParam() {
			var url = decodeURI(weex.config.bundleUrl); //取得整个地址栏
			let query1 = jsonAnalysis(url.split('?')[1]);
			this.pageType = query1.pageType
			this.type = query1.type
			// modal.alert({message:JSON.stringify(query1) })

		}
	},
	mounted() {
		this.getUrlParam();
	}
};
</script>

<style scoped>
</style>